//
//  HEDefine.h
//  huien
//
//  Created by yiban on 2017/7/7.
//  Copyright © 2017年 lcb. All rights reserved.
//

#define tabcolor UIColorFromRGB(0xcdcccd)
#define adscolor UIColorFromRGB(0x4d8fcb)
#define mtcolor UIColorFromRGB(0x5b6167)
#define h1color UIColorFromRGB(0x333333)
#define h2color UIColorFromRGB(0x999999)
#define codecolor UIColorFromRGB(0xeb9a1a)
#define btncolor UIColorFromRGB(0x3db2ff)
#define linecolor UIColorFromRGB(0xeff2f2);

#define  YB_ScreenWidth   [UIScreen mainScreen].bounds.size.width
// UIScreen height.
#define  YB_ScreenHeight  [UIScreen mainScreen].bounds.size.height
// iPhone X
#define  YB_iPhoneX (YB_ScreenWidth == 375.f && YB_ScreenHeight == 812.f ? YES : NO)
// Status bar height.
#define  YB_StatusBarHeight      (YB_iPhoneX ? 44.f : 20.f)
// Navigation bar height.
#define  YB_NavigationBarHeight  44.f

#define  YB_HeaderHeight  (YB_iPhoneX ? 88.f : 64.f)

// Tabbar height.
#define  YB_TabbarHeight         (YB_iPhoneX ? (49.f+34.f) : 49.f)
// Tabbar safe bottom margin.
#define  YB_TabbarSafeBottomMargin         (YB_iPhoneX ? 34.f : 0.f)
// Status bar & navigation bar height.
#define  YB_ViewSafeAreInsets(view) ({UIEdgeInsets insets; if(@available(iOS 11.0, *)) {insets = view.safeAreaInsets;} else {insets = UIEdgeInsetsZero;} insets;})
